package com.example.myapplication.ui.activity.square

import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
import com.example.myapplication.request.SquareRequest
import kotlinx.coroutines.launch

/**
 *分享文章
 *
 * @author : Kun
 * @date : 2021/6/10
 * @time : 14:29
 */
class ShareArticleViewModel : ViewModel() {
    /**
     * 广场相关的请求
     */
    val squareRequest = SquareRequest()

    /**
     * 分享文章的请求
     */
    fun requestSharedArticle(title: String, link: String) {
        viewModelScope.launch {
            squareRequest.requestSharedArticle(title, link)
        }
    }
}